package com.zlb.leyaoxiu2.sqlite.entity;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;

/**
 * Created by Administrator on 2016/8/17.
 */
public class ImMessage extends RealmObject {

    @PrimaryKey
    private String unique;  //消息唯一值
    private String userId;        //自己的Id
    private String peerId;        //联系人Id
    private int unRead;                 //是否已读
    private String msgType;               //消息类型(文字，图片,语音)
    
    private String content;              //内容
    private String localVoice;           //本地语音文件path
    private String localImg;             //本地图片文件path
    private Long msgTime;                //消息时间
    private int msgFrom;                //消息来源(对方发送过来的或者自己发送过去的)
    
    private int sendState;              //发送状态
    private int isShowTime = -1;        //是否显示头部时间
    private String ext1;                //拓展字段
    private String userLevel;

    @Override
    public String toString() {
        return "ImMessage{" +
                "unique='" + unique + '\'' +
                ", userId='" + userId + '\'' +
                ", peerId='" + peerId + '\'' +
                ", unRead=" + unRead +
                ", msgType='" + msgType + '\'' +
                ", content='" + content + '\'' +
                ", localVoice='" + localVoice + '\'' +
                ", localImg='" + localImg + '\'' +
                ", msgTime=" + msgTime +
                ", msgFrom=" + msgFrom +
                ", sendState=" + sendState +
                ", isShowTime=" + isShowTime +
                ", ext1='" + ext1 + '\'' +
                ", userLevel='" + userLevel + '\'' +
                '}';
    }

    public String getUserLevel() {
        return userLevel;
    }

    public void setUserLevel(String userLevel) {
        this.userLevel = userLevel;
    }

    public String getExt1() {
        return ext1;
    }

    public void setExt1(String ext1) {
        this.ext1 = ext1;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPeerId() {
        return peerId;
    }

    public void setPeerId(String peerId) {
        this.peerId = peerId;
    }

    public String getUnique() {
        return unique;
    }

    public void setUnique(String unique) {
        this.unique = unique;
    }

    public int getUnRead() {
        return unRead;
    }

    public void setUnRead(int unRead) {
        this.unRead = unRead;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getLocalVoice() {
        return localVoice;
    }

    public void setLocalVoice(String localVoice) {
        this.localVoice = localVoice;
    }

    public String getLocalImg() {
        return localImg;
    }

    public void setLocalImg(String localImg) {
        this.localImg = localImg;
    }

    public Long getMsgTime() {
        return msgTime;
    }

    public void setMsgTime(Long msgTime) {
        this.msgTime = msgTime;
    }

    public int getMsgFrom() {
        return msgFrom;
    }

    public void setMsgFrom(int msgFrom) {
        this.msgFrom = msgFrom;
    }

    public int getSendState() {
        return sendState;
    }

    public void setSendState(int sendState) {
        this.sendState = sendState;
    }

    public int getIsShowTime() {
        return isShowTime;
    }

    public void setIsShowTime(int isShowTime) {
        this.isShowTime = isShowTime;
    }

}
